import React from "react";
export function hoc3(WrappendComponent){
    return class extends React.Component{
        render(){
            return <WrappendComponent/>
        }
    }
}

export function hoc4(WrappendComponent,userName,age){
    return class extends React.Component{
        render(){
            return <WrappendComponent userName={userName} age={age} />
        }
    }
}

export function hoc5(WrappendComponent,options){
    return class extends React.Component{
        render(){
            return <WrappendComponent {...options} />
        }
    }
}

export function hoc6(options){
    return function(WrappendComponent){
        return class extends React.Component{
            render(){
                return <WrappendComponent {...options}/>
            }
        }

    }
}

export function hoc7(mapStateToProps){
    return function(WrappendComponent){
        return class extends React.Component{
            state = {
                userName:"wangwu",
                age:100
            }
            render(){
                return <WrappendComponent
                    {...mapStateToProps(this.state)} />
            }
        }
    }
}